﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="customers_list.aspx.cs" Inherits="LinkCard.AdminCP.CRM.customers_list" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script language="javascript">
        function setValue(page) {
            location.href = 'customers_list.aspx?page=' + page;
        }
        function confirmAction() {
            if (confirm('Bạn thực sự muốn thực hiện thao tác này ???')) {
                // you clicked the OK button.
                // you can allow the form to post the data.
                return true;
            }
            else {
                // you clicked the Cancel button.
                // you can disallow the form submission.
                return false;
            }
        }
    </script>
    <section id="content">
  <section class="container_12 clearfix">
    <section id="main" class="grid_12">
      <article>
        <div class="h1">Danh sách lưu tạm</div>
        
          <div class="box search">
       
          <label >Tìm kiếm:</label>
          <input  type="text" onfocus="this.value = '';" onblur="if (this.value == '') { this.value='Họ và tên'; }"  value="Họ và tên" size="40" id="Fullname"  runat="server" />
          <input type="text" onfocus="this.value = '';" onblur="if (this.value == '') { this.value='Mã thẻ'; }"   value="Mã thẻ" size="50" id="CardNumber" runat="server" />
          
          <input type="text" size="25"  onfocus="this.value = '';" onblur="if (this.value == '') { this.value='Ngày sinh'; }" value="Ngày sinh"  maxlength="10"  id="Birthday"  class="hasDatepicker" name="Birthday" runat="server" />
          
         <input type="text" onfocus="this.value = '';" onblur="if (this.value == '') { this.value='Số CMTND'; }"   value="Số CMTND" size="25" id="ID" runat="server" />
         <input type="text" onfocus="this.value = '';" onblur="if (this.value == '') { this.value='Điện thoại'; }"   value="Điện thoại" size="25" id="MobilePhone" runat="server" />

          
          
          <asp:Button ID="btnSearch" class="button small" Style="width: 60px;"
                                runat="server" Text="Tìm kiếm" onclick="btnSearch_Click"  />
        
      </div>
          <table id="table1" class="gtable sortable" >
            <thead>
              <tr>
                <th><input type="checkbox" class="checkall" /></th>
                <th>Họ và tên</th>
                <th>Mã thẻ</th>
                <th>Ngày sinh</th>
                <%--<th >Số CMTND</th>--%>
                <th>Điện thoại</th>
                <th style="text-align: right">Điểm tích lũy</th>
                <th style="text-align: right">Tiền đã giao dịch</th>
                
                <th style="text-align: right">Hạng thẻ</th>
                  <th style="text-align: right">GLP</th>
                <th ></th>
             
              </tr>
            </thead>
            <tbody>
            <asp:Repeater ID="msgList" runat="server" OnItemDataBound="msgList_ItemDataBound">
                        <ItemTemplate>
                            <tr>
                                <td >
                                    <input type="checkbox" id="chkDelete" runat="server" />
                                </td>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "Fullname")%>
                                </td>
                                
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "CardNumber")%>
                                </td>
                                <td>
                                    <%# LinkCard.AdminCP.Common.ConvertUtility.ToDateTime(DataBinder.Eval(Container.DataItem, "Birthday")).ToString("dd/MM/yyyy")%>
                                </td>
                               <%-- <td>
                                    <%# DataBinder.Eval(Container.DataItem, "ID")%>
                                </td>--%>
                                <td>
                                    <%# DataBinder.Eval(Container.DataItem, "MobilePhone")%>
                                </td>
                                <td align="right">
                                     <%# DataBinder.Eval(Container.DataItem, "Point")%>
                                </td>
                                <td  align="right">
                                     <%# DataBinder.Eval(Container.DataItem, "TransactionAmount")%>
                                </td>
                                 
                                  <td align="right">
                                     <label id="CardLevel" runat="server"></label>

                                </td>
                                    <td align="right">
                                     <label id="VietnamAirlineGLP" runat="server"></label>
                                     <img id="NotVietnamAirlineGLP" runat="server" />
                                </td>
                                <td>
                                    <a style='display:<%#CheckSystemRegister(DataBinder.Eval(Container.DataItem, "SystemRegister").ToString())%>' href="customers_edit.aspx?CustomerID=<%# DataBinder.Eval(Container.DataItem, "CustomerID")%>" title="Sửa"><img src="../Template/images/icons/edit.png" alt="Sửa" /></a> 
                                    
                                    <a style='display:<%#CheckOnline(DataBinder.Eval(Container.DataItem, "SystemRegister").ToString())%>' href="customers_new.aspx?CustomerID=<%# DataBinder.Eval(Container.DataItem, "CustomerID")%>" title="Sửa">Tạo mới</a>
                                        
                                 </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                    <tr id="msgNoData" runat="server">
                        <td colspan="9" align="center">
                            Không có khách hàng nào!
                        </td>
                    </tr>
              
              
            </tbody>
          </table>
          <div class="tablefooter clearfix">
            <div class="actions">
              <select id="ActionOption" runat="server">
                <option value="0">Thao tác</option>
                <option value="2">Chuyển duyệt</option>
                <option value="1">Xóa</option>
              </select>
              
              <asp:Button ID="btnDelete" 
                                runat="server" Text="Thực hiện"  class="button small" 
                    style="width:80px;" onclick="btnDelete_Click" OnClientClick="javascript:return confirmAction();"/>
            </div>
            <div class="pagination" id="divPager" runat="server">
               <asp:Literal ID="PagerShow" runat="server"></asp:Literal>
               </div>
          </div>
       
      </article>
    </section>
    
  </section>
</section>
</asp:Content>
